package com.mc.string;

import java.util.Scanner;

public class FactorDivide {
    public static void main(String[] args){
        
        Scanner sc = new Scanner(System.in);
        while(sc.hasNext()){
            double num = sc.nextDouble();
            double ceil = Math.floor(num);
            if((num-ceil)>=0.5)
                System.out.println((int)(ceil+1));
            else
                System.out.println((int)(ceil));
        }

        
        while(sc.hasNextLong()){
            getResult(sc.nextLong());
        }
    }
    public static void getResult(long input){
        
        for(int i=2;i<=input;){
            if(input%i==0){
             	System.out.print(i+" ");
                input = input/i;
            }
            else{
                i++;
            }
        }
    }
}
